using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;


namespace _395_2d
{
    public class Bullet : Projectile
    {
        Vector2 velocity;

        public Bullet(Vector2 p, Vector2 v, int d, string t)
        {
            velocity = v;
            Texture = t;
            Damage = d;
            bounds = new BoundingBox(p, new Vector2(7,7));
        }

        public override void Draw()
        {
            spriteBatch.Begin();
            spriteBatch.Draw((Texture2D)Content.Textures[Texture], bounds.topLeft, Color.White);
            spriteBatch.End();
        }

        public void Update(GameTime gameTime)
        {
            bounds.topLeft += (float)gameTime.ElapsedGameTime.TotalSeconds * velocity;
        }
    }
}
